<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="UTF-8">
	<title>pig书屋--个人中心</title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" media="all">
	<link rel="stylesheet" type="text/css" href="css/qian.css" media="all">
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
</head>
<body>
	<div class="container">
		<%@ include file="include/top.jsp" %>

		<div class="content" style="margin:0px 10px;">
			<div class="part1 clearfix" style="border-bottom:1px double #AEAEAE;padding:0px 0px 10px 0px;">
				<ul class="breadcrumb" style="margin-bottom:0px;">
				  <li><a href="/home.action">首页</a> <span class="divider">/</span></li>
				  <li class="active">用户中心</li>
				</ul>
				<%@include file="include/userCenter-left.jsp" %>
				
	            <div class="right pull-left" style="margin-left:50px;width:600px;">
	            	<!-- 内容 -->
	            	<div class="content">
						<!-- <ul class="breadcrumb" style="margin:0px;">
						  <li><a href="#">首页</a> <span class="divider">/</span></li>
						  <li class="active">订单详情</li>
						</ul> -->
						<h4 style="border-bottom:2px solid #000"><i class="icon-cog"></i>确认收货地址</h4>
						<form class="form-horizontal fm" method="post" action="/submitOrder.action">
						  <div class="control-group">
						    <label class="control-label" for="inputEmail"><i class="icon-asterisk"></i>收货人姓名</label>
						    <div class="controls">
						      <input type="text" name="sender.name" placeholder="收货人姓名">
						    </div>
						  </div>
						  <div class="control-group">
						    <label class="control-label" for="inputPassword"><i class="icon-asterisk"></i>地址</label>
						    <div class="controls">
						      <input type="text" name="sender.address" placeholder="地址">
						    </div>
						  </div>
						  <div class="control-group">
						    <label class="control-label" for="inputEmail"><i class="icon-asterisk"></i>电话</label>
						    <div class="controls">
						      <input type="text" name="sender.phone" placeholder="电话">
						    </div>
						  </div>
						  <div class="control-group">
						    <label class="control-label" for="inputPassword">备注</label>
						    <div class="controls">
						      <input type="text" name="sender.remark" placeholder="备注">
						    </div>
						  </div>			  
						
			
						<h4 style="border-bottom:2px solid #000"><i class="icon-credit-card"></i>确认付款信息</h4>
						<!-- <form class="form-horizontal"> -->
						  <label class="radio" style="margin-left:40px;">
						    <input type="radio" name="order.paytype" id="optionsRadios1" value="货到付款" checked="">
						    货到付款
						  </label>
						  <label class="radio" style="margin-left:40px;">
						    <input type="radio" name="order.paytype" id="optionsRadios2" value="支付宝">
						    支付宝
						  </label>			  
						<!-- </form> -->
			
						<h4 style="border-bottom:2px solid #000"><i class="icon-shopping-cart"></i>确认订单信息</h4>
						<div style="padding:20px; border:1px dotted #EFDEA5;margin:20px;">
							<table class="table table-hover" style="margin-bottom:0px;">
								<tbody>
									<tr>
										<th>商品名称</th>
										<th>单价</th>
										<th>数量</th>
										<th>小计</th>
										<th></th>
									</tr>
									<tr>
										<td>${shopcar.book.bookName}</td>
										<td>${shopcar.book.price}</td>
										<td>${shopcar.num}</td>
										<td>${shopcar.book.price*shopcar.num}</td>
										<!-- <td><a href=""><i class="icon-remove"></i></a></td> -->
									</tr>
									<tr>
										<td colspan="6" style="color:#FF6600;font-size:20px;text-align:right">总价：${shopcar.book.price*shopcar.num}</td>
									</tr>
								</tbody>
							</table>
						</div>
						<input type="hidden" value="${shopcar.id}" name="shopcar.id">
						<div class="choose">
							<!-- <div class="navbar">
							  <div class="navbar-inner"> -->
							  	<button class="btn" style="float:right;margin-right:10px;">取消</button>
							  	<button class="btn btn-warning submitOrder" style="float:right;margin-right:10px;">提交订单</button>	    
							    <div class="clear" style="clear:both;"></div>
							  <!-- </div>
							</div> -->
						</div>
					  </form>
					</div>
				</div>
			</div>
		</div>
		
		<%@ include file="include/foot.jsp" %>
	</div>
	<script src="js/validate/jquery.validate.js"></script>
	<script>
    	$(function(){
    		$(".fm").validate(
    			{
    			rules:{
    				'sender.name':{
    					required:true
    				},
    				'sender.address':{
    					required:true
    				},
    				'sender.phone':{
    					required:true
    				}
    			},
    			messages:{
    				'sender.name':{
    					required:'请填写收货人'
    				},
    				'sender.address':{
    					required:'请填写地址'
    				},
    				'sender.phone':{
    					required:'请填写电话'
    				}
    			}
    		});
    		
    		$(".submitOrder").click(function(){
    			$(".fm").submit();
    		});
    	});
	</script>
</body>
</html>